package com.Service.Impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.Dao.BaseDaoI;
import com.Entity.TopicInfo;
import com.Service.TopicService;

@Service("topicservice")
public class TopicServiceImpl extends BaseServiceImpl<TopicInfo> implements
		TopicService {
	@Autowired
	private BaseDaoI<TopicInfo> topicDao;

	private List<TopicInfo> topiclist = new ArrayList<TopicInfo>();

	@Override
	public List<TopicInfo> getTpoicList(int page, int rows) {

		String hql = "from TopicInfo t order by t.publicTime DESC";
		topiclist = topicDao.find(hql, page, rows);
		return topiclist;
	}

}
